package com.eu.ebpm.engine.task;

import org.springframework.stereotype.Component;


@Component
public class TestServiceTaskExcute implements ServiceTaskExecute {

	public void execute(DelegateTask delegateTask) {
		int day = 0;
		String suggest = "";
		if(delegateTask.getPreviousVariable("day") != null) day = (Integer) delegateTask.getPreviousVariable("day");
		if(delegateTask.getPreviousVariable("suggest") != null) suggest = (String) delegateTask.getPreviousVariable("suggest");
		System.out.println("==============测试【自动任务】：delegateTask.variables.day=(" + day + ")suggest(" + suggest + ")===================");
		day = day + 3;
		if(day > 3) {
			delegateTask.setVariable("day", day);
		}
		if(suggest.equals("toMore")) {
			delegateTask.setVariable("fuck", "theDayTooMore");
		}
	}

}
